<?php

namespace app\admin\model\goods;

use think\Model;

/**
 * Goods
 */
class Goods extends Model {
    // 表名
    protected $name = 'goods';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    protected $updateTime = false;


    public function brand(){
        return $this->hasOne('Brand', 'id', 'goods_brand_id');
    }

    public function collection(){
        return $this->hasOne('Collection', 'goods_id', 'id');
    }


}


